home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 109
/
Vol 109.iso
/
games
/
punching.swf
/
scripts
/
frame_57
/
DoAction.as
Wrap
Text File
|
2008-11-12
|
3KB
|
85 lines
if("21" >= count)
{
setProperty(loader add "/trail1", _X, getProperty(loader add "/trail1", _X) + xMove);
setProperty(loader add "/trail1", _Y, getProperty(loader add "/trail1", _Y) - yMove);
setProperty(loader add "/trail1", _xscale, getProperty(loader add "/trail1", _xscale) - scale);
setProperty(loader add "/trail1", _yscale, getProperty(loader add "/trail1", _yscale) - scale);
posZ = getProperty(loader add "/trail1", _xscale);
posX = getProperty(loader add "/trail1", _X);
count += "1";
if(posZ < "42" and "34" < posZ and posX - target1X < "30" and - "30" < posX - target1X and eval(loader add "/target1:hit") == "0" and eval(loader add "/target1:up") == "1" and eval(loader add "/target1:down") == "0" and count < "11")
{
if(target1 < "8")
{
score += "20";
}
else if(score >= "10")
{
score -= "10";
}
tellTarget(loader add "/target1")
{
hit = "1";
gotoAndStop("hit");
play();
}
scale *= - "1";
xMove *= - "1";
yMove *= - "1";
count = "23" - count;
}
if(posZ < "32" and "24" < posZ and posX - target2X < "27" and - "27" < posX - target2X and eval(loader add "/target2:hit") == "0" and eval(loader add "/target2:up") == "1" and eval(loader add "/target2:down") == "0" and count < "11")
{
if(target2 < "8")
{
score += "25";
}
else if(score >= "10")
{
score -= "10";
}
tellTarget(loader add "/target2")
{
hit = "1";
gotoAndStop("hit");
play();
}
scale *= - "1";
xMove *= - "1";
yMove *= - "1";
count = "23" - count;
}
if(posZ < "24" and "12" < posZ and posX - target3X < "24" and - "24" < posX - target3X and eval(loader add "/target3:hit") == "0" and eval(loader add "/target3:up") == "1" and eval(loader add "/target3:down") == "0" and count < "11")
{
if(target3 < "8")
{
score += "30";
}
else if(score >= "10")
{
score -= "10";
}
tellTarget(loader add "/target3")
{
hit = "1";
gotoAndStop("hit");
play();
}
scale *= - "1";
xMove *= - "1";
yMove *= - "1";
count = "23" - count;
}
prevFrame();
}
else
{
setProperty(loader add "/trail1", _xscale, "100");
setProperty(loader add "/trail1", _yscale, "100");
tellTarget(loader add "/trail0")
{
gotoAndPlay(2);
}
gotoAndPlay(52);
}